<?php

	require_once $_SERVER['DOCUMENT_ROOT'] . '/SAGER/model/interfaces/IConnectionAccessDao.php';
	
	error_reporting (E_ALL ^ E_NOTICE);
	
	$debug = $_SESSION['debug'];
	
	class MySqlConnectionAccessDao implements IConnectionAccessDao{
		
		private $server="localhost";
		 private $username="root";
		 private $password ="";
		 private $databaseName="sager";
			
		/**
		 * Constructor
		 */
		public function __construct () {
			 
		}
		 
		public  function openConnection() {
			$conn = mysql_connect($this -> server, $this -> username, $this -> password);
			mysql_select_db($this -> databaseName, $conn);
			return $conn;
		}
		 
		public function closeConnection($conn) { 
			mysql_close($conn);	 
		}
	}
?>